package com.atguigu;

import org.assertj.core.util.Lists;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class CollectionDemo {
    public static void main(String[] args) {

//        ArrayList<Object> list = new ArrayList<>();
//        ArrayList<String> newArrayList = Lists.newArrayList("a", "b", "c");
//        for (String s : newArrayList) {
//            list.add(s.toUpperCase());
//        }
//        System.out.println(list);

        ArrayList<String> newArrayList = Lists.newArrayList("a", "b", "c");
        List<String> list = newArrayList.stream().map((aArrayList) -> {
            System.out.println(aArrayList);
            return aArrayList.toUpperCase();
        }).collect(Collectors.toList());
        System.out.println(list);

    }
}
